package com.qingae.earn.action;

import javax.annotation.Resource;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.test.context.ContextConfiguration;

import com.qingae.earn.service.AnalyAndBuyService;
import com.qingae.earn.service.NoticeService;
import com.qingae.earn.service.StatAnalyService;
import com.qingae.earn.service.WardNumService;

@ContextConfiguration(locations = "classpath:com/qingae/earn/resource/spring/appliCationContext.xml")
public abstract class BaseAction {
	@Resource
	public AnalyAndBuyService analyAndBuyService;
	
	@Resource
	public NoticeService noticeService;
	
	@Resource
	public StatAnalyService statAnalyService;
	
	@Resource
	public WardNumService wardNumService;

    public BaseAction() {
        String[] resources = { "com/qingae/earn/resource/spring/appliCationContext.xml" };
        ApplicationContext context = new ClassPathXmlApplicationContext(resources);
        analyAndBuyService = (AnalyAndBuyService) context.getBean("analyAndBuyService");
        noticeService = (NoticeService) context.getBean("noticeService");
        statAnalyService = (StatAnalyService) context.getBean("statAnalyService");
        wardNumService = (WardNumService) context.getBean("wardNumService");
    }
	
    

}
